package com.ranjiaqi.function;

import java.util.function.Consumer;

/**
 * @ClassName Consumer
 * @Description TODO
 * @Author hp
 * @Date 2021/7/5 15:54
 * @Version 1.0
 **/
public class ConsumerTest {
    public static void main(String[] args) {
        String str="xixixi";
        consunmer(a -> System.out.println(a.length()),str);
    }

    public static void consunmer(Consumer<String> con, String str){
        con.accept(str);
    }
}

